<?php

function show_games($order_by)
{
	connect();
	
	//orismos erwtimatos
	$query="select * from game order_by '$order_by'";
	$result=exec_sql_query($query);
	
	//elegxos gia yparksi apotelesmatos
	if(mysql_num_rows($result) == 0)
	{
		echo "There are no games";
		echo "</br>";
	}
	
	//an yparxoun apotelesmata emfanise ta ola
	while($rows=mysql_fetch_array($result)
	{
		echo $row["game_id"]. "-" .$row["title"]. "-" .$row["release_date"]. "-" .$row["category_id"];
		echo "</br";
	}
	disconnect();
}
?>